home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / July 96 / Re Modal Dialogs- Part I.1 < prev    next >
Encoding:
Internet Message Format  |  1996-07-16  |  1.7 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Modal Dialogs- Part I
  2. Sent:        7/15/96 11:35 AM
  3. Received:    7/15/96 11:41 AM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Mail*LinkĀ® SMTP               RE>Modal Dialogs: Part I
  9. >
  10. >>I followed the example of ODFForm's Password dialog to create a text entry
  11. >>dialog. The action of the dialog when the "OK" button is hit is to post an
  12. >>undoable command.
  13. >>
  14. >>So the question is, is it OK to pass the dialog's frame to the FW_CCommand
  15. >>constructor? The frame will be destroyed when the dialog closes, right? But
  16. >>this seems to work - I guess I'm wondering what that parameter and the
  17. >>fFrame data member of FW_CCommand are all about. Comments?
  18. >
  19. >The fFrame data member of a command represents the display frame that is 
  20. >affected by the change. In the case of a dialog you shouldn't pass the 
  21. >dialog frame to the command unless the command is undoable while the 
  22. >dialog is open. In your case fFrame is apparently not used in your UndoIt 
  23. >and RedoIt methods, so you're getting away with it.
  24. >
  25. >Mary Boetcher
  26. >ODF person
  27. >
  28.  
  29. Don't forget also that when opening a dialog you should mark the undo stack. When the dialog goes away you need to clear the undo stack using the previous mark. Command that were executed while the dialog was opened should not be undoable anymore.
  30.  
  31. ........................................................................
  32.  Henri Lamiraux                                      lamiraux@apple.com
  33.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  34. ........................................................................
  35.  
  36.  
  37.